<?php 
/**
 *   Joomdiet - components/views/recommendedingestsresult/tmpl/default.php
 *   Author: Juan Dapena Paz (juan@bittingbits.com)
 *   Copyright (C) 2010 Bitting Bits S.L.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
defined('_JEXEC') or die('Restricted access'); ?>
<div id="joomdiet">
    <div id="daypartselectorarea">
        <ul>
            <li class="daypartitem" id="general"><?php echo JText::_('COM_JOOMDIET_GENERAL'); ?></li>
            <li class="daypartitem" id="minerals"><?php echo JText::_('COM_JOOMDIET_MINERALS'); ?></li>
            <li class="daypartitem" id="vitamins"><?php echo JText::_('COM_JOOMDIET_VITAMINS'); ?></li>
        </ul>
    </div>
    <div id="slidergeneral" class="slider2">
        <h3><?php echo JText::_('COM_JOOMDIET_GENERAL'); ?></h3>
        <div id="recommendedgeneral" class="recommendedarea">
            <table class="resultstable" width="100%">
            <?php $k = 0; foreach ($this->result as $element) { 
                if ($element['0']->category == 0) { ?>
                <tr class="row<?=$k;?>">
                    <td width="80%">
                        <?=$element['0']->name;?>
                    </td> 
                    <td align="right">
                        <?=$element['1'];?>
                    </td> 
                    <td>
                        <?=$element['0']->unit;?>
                    </td>
                </tr>
            <?php $k = 1 - $k; } } ?>
            </table>
        </div>
    </div>
    <div id="sliderminerals" class="slider2">
        <h3><?php echo JText::_('COM_JOOMDIET_MINERALS'); ?></h3>
        <div id="recommendedvitamins" class="recommendedarea">
            <table class="resultstable" width="100%">
            <?php $k = 0; foreach ($this->result as $element) { 
                if ($element['0']->category == 1) { ?>
                <tr class="row<?=$k;?>">
                    <td width="80%">
                        <?=$element['0']->name;?>
                    </td> 
                    <td align="right">
                        <?=$element['1'];?>
                    </td> 
                    <td>
                        <?=$element['0']->unit;?>
                    </td>
                </tr>
            <?php $k = 1 - $k; } } ?>
            </table>
        </div>
    </div>
    <div id="slidervitamins" class="slider2">
        <h3><?php echo JText::_('COM_JOOMDIET_VITAMINS'); ?></h3>
        <div id="recommendedminerals" class="recommendedarea">
            <table class="resultstable" width="100%">
            <?php $k = 0; foreach ($this->result as $element) { 
                if ($element['0']->category == 2) { ?>
                <tr class="row<?=$k;?>">
                    <td width="80%">
                        <?=$element['0']->name;?>
                    </td> 
                    <td align="right">
                        <?=$element['1'];?>
                    </td> 
                    <td>
                        <?=$element['0']->unit;?>
                    </td>
                </tr>
            <?php $k = 1 - $k; } } ?>
            </table>
        </div>
    </div>
</div>
